/*
 * @Description: 项目动态信息数据模型
 * @Author: wind-lc
 * @version: 1.0
 * @Date: 2021-09-24 15:53:14
 * @LastEditTime: 2022-06-14 11:41:20
 * @FilePath: \cscec-pms-admin\src\views\project\projectDynamicInformation\model.js
 */
// 搜索选项
const searchOption = [
  {
    name: '填报人',
    value: 'fillPersonName',
    type: 'input'
  },
  {
    name: '月度',
    value: 'monthly',
    type: 'monthRange',
    attr: {
      rangeFormat: ['monthlyStartTime', 'monthlyEndTime']
    }
  },
  {
    name: '状态',
    value: 'auditStatus',
    type: 'select',
    data: [
      {
        value: 'DRAFT',
        label: '待提交'
      },
      {
        value: 'SUBMITTED',
        label: '审核中'
      },
      {
        value: 'PAST',
        label: '审核通过'
      },
      {
        value: 'REJECTED',
        label: '审核不通过'
      }
    ]
  },
  {
    name: '填报日期',
    value: 'startEndDate',
    type: 'dateRange',
    attr: {
      rangeFormat: ['fillStartTime', 'fillEndTime']
    }
  }
]
// 项目动态信息表头
const columns = [
  {
    title: '序号',
    width: 80,
    align: 'center',
    customRender: (text, record, index) => {
      return index + 1
    }
  },
  {
    title: '分公司',
    width: 90,
    dataIndex: 'branchComName'
  },
  {
    title: '项目名称',
    width: 100,
    dataIndex: 'projectName',
    ellipsis: true,
    // scopedSlots: { customRender: 'projectName' }
  },
  {
    title: '月度',
    width: 100,
    dataIndex: 'monthly'
  },
  {
    title: '填报人',
    width: 100,
    dataIndex: 'fillPersonName'
  },
  {
    title: '填报日期',
    width: 100,
    align: 'center',
    dataIndex: 'fillDate'
  },
  {
    title: '状态',
    width: 100,
    align: 'center',
    dataIndex: 'auditStatusName'
  },
  {
    title: '操作',
    dataIndex: 'operation',
    width: 180,
    scopedSlots: { customRender: 'operation' }
  }
]
// 项目动态履约信息
const formList = [
  {
    title: '项目概况'
  },
  {
    label: '项目名称',
    keyName: 'projectName'
  },
  {
    label: '月度',
    keyName: 'monthly'
  },
  {
    label: '项目状态',
    keyName: 'projectStatus',
  },
  {
    label: '形象进度',
    keyName: 'imageProgressId'
  },
  {
    label: '在建建筑面积万m²',
    keyName: 'totalArea'
  },
  {
    label: '在施单体工程个数',
    keyName: 'monoSize'
  },
  {
    label: '项目特点或重难点',
    keyName: 'features',
    span: 24
  },
  {
    label: '通过项目观摩等活动，企业获得诚信分加分',
    keyName: 'bonusPoints'
  },
  {
    label: '已组织创优级别',
    keyName: 'creativeLevelId'
  },
  {
    label: '已组织创优内容',
    keyName: 'meritContentId'
  },
  {
    label: '已组织观摩级别',
    keyName: 'observingLevelId'
  },
  {
    label: '已组织观摩内容',
    keyName: 'observingContent',
    type: 'BaseTextarea',
    span: 24
  },
  {
    title: '项目工期信息'
  },
  {
    label: '原合同开工日期',
    keyName: 'contractStartDate'
  },
  {
    label: '原合同竣工日期',
    keyName: 'contractFinishDate'
  },
  {
    label: '原合同工期(天)',
    keyName: 'contractDuration'
  },
  {
    label: '变更后开工日期',
    keyName: 'changeAfterStartTime'
  },
  {
    label: '变更后竣工日期',
    keyName: 'changeAfterFinishDate'
  },
  {
    label: '变更后工期(天)',
    keyName: 'changeAfterDuration'
  },
  {
    label: '项目开工令/开工报告',
    keyName: 'startWorkReportsFileList',
    type: 'uploadFile',
    span: 24
  },
  {
    label: '实际开工日期',
    keyName: 'actualStartTime'
  },
  {
    label: '实际竣工日期',
    keyName: 'actualFinishDate'
  },
  {
    label: '实际工期(天)',
    keyName: 'actualDuration'
  },
  {
    label: '预估竣工年度',
    keyName: 'forecastFinishYear'
  },
  {
    label: '预估竣工月份',
    keyName: 'forecastFinishMonth'
  },
  {
    label: '实际竣工年度',
    keyName: 'actualFinishYear'
  },
  {
    label: '实际竣工季度',
    keyName: 'actualFinishQuarter'
  },
  {
    label: '实际竣工月份',
    keyName: 'actualFinishMonth'
  },
  {
    label: '实际延误工期(天)',
    keyName: 'actualDelayDuration'
  },
  {
    label: '工期延误率(%)',
    keyName: 'durationDelayRate'
  },
  {
    label: '甲方确认原合同外顺延工期(天)',
    keyName: 'contractDelayDuration'
  },
  {
    label: '合同外工期确认率(%)',
    keyName: 'durationConfirmRate'
  },
  {
    label: '计划模块节点按时完成率(%)',
    keyName: 'nodeOnTimeCompletionRate'
  },
  {
    title: '竣工与费用补偿情况'
  },
  {
    label: '未履约延期成本(万元)',
    keyName: 'delayCost'
  },
  {
    label: '业主费用补偿(万元)',
    keyName: 'ownerCost'
  },
  {
    label: '竣工情况',
    keyName: 'completionSituation'
  },
  {
    label: '补偿比例(%)',
    keyName: 'subsidyRate'
  },
  {
    title: '合同额情况'
  },
  {
    label: '年度计划产值(万元)',
    keyName: 'annualPlanOutputValue'
  },
  {
    label: '年度目标产值(万元)',
    keyName: 'annualTargetOutputValue'
  },
  {
    label: '年初至今完成施工产值(万元)',
    keyName: 'toTodayCompleteOutputValue'
  },
  {
    label: '年初至今业主确认(万元)',
    keyName: 'toTodayOwnerConfirmOutputValue'
  },
  {
    label: '当月完成产值(万元)',
    keyName: 'monthCompleteOutputValue'
  },
  {
    label: '当月业主确认产值(万元)',
    keyName: 'monthOwnerConfirmOutputValue'
  },
  {
    label: '累计专业工程暂估价发包额(万元)',
    keyName: 'contractAmount'
  },
  {
    label: '累计专业工程暂估价签约额(万元)',
    keyName: 'signingAmount'
  },
  {
    label: '现场带动专业工程暂估价签约率(%)',
    keyName: 'contractRate'
  },
  {
    label: '填报人',
    keyName: 'fillPersonName'
  },
  {
    label: '填报日期',
    keyName: 'fillDate'
  },
  {
    label: '附件',
    keyName: 'contractAmountCaseFileList',
    type: 'uploadFile',
    span: 24,
  }
]
// 动态信息编辑
const updataList1 = [
  {
    label: '项目状态',
    keyName: 'projectStatus',
    type: 'a-select',
    data: [
      {
        label: '施工准备',
        value: 'ONGOING'
      },
      {
        label: '在建',
        value: 'START_WORKING'
      },
      {
        label: '停工',
        value: 'SHUTDOWN'
      },
      {
        label: '停缓建',
        value: 'SUSPENDED'
      },
      {
        label: '竣工',
        value: 'MAINTENANCE_PERIOD'
      }
    ],
    rules: [{ required: true, message: '请选择', trigger: 'change' }]
  },
  {
    label: '形象进度',
    keyName: 'imageProgressId',
    type: 'a-select',
    data: [],
    rules: [{ required: true, message: '请选择', trigger: 'change' }]
  },
  {
    label: '年度计划产值(万元)',
    keyName: 'annualPlanOutputValue',
    type: 'BaseInputNumber',
    rules: [{ required: true, message: '请输入', trigger: 'change' }],
    precision: 2,
    attrs: {
      min: 0,
      step: 0.01
    },
  },
  {
    label: '年度目标产值(万元)',
    keyName: 'annualTargetOutputValue',
    type: 'BaseInputNumber',
    rules: [{ required: true, message: '请输入', trigger: 'change' }],
    precision: 2,
    attrs: {
      min: 0,
      step: 0.01
    },
  },
  {
    label: '年初至今完成施工产值(万元)',
    keyName: 'toTodayCompleteOutputValue',
    type: 'BaseInputNumber',
    rules: [{ required: true, message: '请输入', trigger: 'change' }],
    precision: 2,
    attrs: {
      min: 0,
      step: 0.01
    },
  },
  {
    label: '年初至今业主确认(万元)',
    keyName: 'toTodayOwnerConfirmOutputValue',
    type: 'BaseInputNumber',
    rules: [{ required: true, message: '请输入', trigger: 'change' }],
    precision: 2,
    attrs: {
      min: 0,
      step: 0.01
    },
  },
  {
    label: '当月完成产值(万元)',
    keyName: 'monthCompleteOutputValue',
    type: 'BaseInputNumber',
    rules: [{ required: true, message: '请输入', trigger: 'change' }],
    precision: 2,
    attrs: {
      min: 0,
      step: 0.01
    },
  },
  {
    label: '当月业主确认产值(万元)',
    keyName: 'monthOwnerConfirmOutputValue',
    type: 'BaseInputNumber',
    rules: [{ required: true, message: '请输入', trigger: 'change' }],
    precision: 2,
    attrs: {
      min: 0,
      step: 0.01
    },
  },
  {
    label: '通过项目观摩等活动，企业获得诚信分加分',
    keyName: 'bonusPoints',
    type: 'BaseInputNumber',
    precision: 1,
    attrs: {
      min: 0,
      step: 0.1
    },
    rules: [{ required: true, message: '请输入', trigger: 'change' }]
  },
  {
    label: '已组织创优级别',
    keyName: 'creativeLevelId',
    type: 'a-select',
    data: [],
    rules: [{ required: true, message: '请选择', trigger: 'change' }]
  },
  {
    label: '已组织创优内容',
    keyName: 'meritContentId',
    type: 'a-select',
    data: [],
    rules: [{ required: true, message: '请选择', trigger: 'change' }]
  },
  {
    label: '已组织观摩级别',
    keyName: 'observingLevelId',
    type: 'a-select',
    data: [],
    rules: [{ required: true, message: '请选择', trigger: 'change' }]
  },
  {
    label: '已组织观摩内容',
    keyName: 'observingContent',
    type: 'BaseTextarea',
    span: 24,
    rules: [{ required: true, message: '请输入', trigger: 'change' }]
  },
  {
    label: '变更后开工日期',
    keyName: 'changeAfterStartTime',
    type: 'a-date-picker',
    attrs: {
      disabledDate: () => { },
      valueFormat: 'YYYY-MM-DD'
    },
    rules: [{ required: true, message: '请输入', trigger: 'change' }]
  },
  {
    label: '项目开工令/开工报告',
    keyName: 'startWorkReportsFileList',
    type: 'uploadFile',
    attrs: {
      disabled: false,
      needChineseName: true,
    },
    businessCode: "PM33",
    span: 24,
    rules: [{ required: true, message: '请上传', trigger: 'change' }]
  },
  {
    label: '实际竣工日期',
    keyName: 'actualFinishDate',
    type: 'a-date-picker',
    attrs: {
      disabledDate: () => { }
      // valueFormat: 'YYYY-MM-DD'
    },
    rules: [{ required: true, message: '请选择', trigger: 'change' }]
  },
  {
    label: '预估竣工年度',
    keyName: 'forecastFinishYear',
    type: 'a-date-picker',
    attrs: {
      mode: 'year',
      format: 'YYYY',
      valueFormat: 'YYYY'
    },
    slot: true,
    rules: [{ required: true, message: '请选择', trigger: 'change' }]
  },
  {
    label: '预估竣工月份',
    keyName: 'forecastFinishMonth',
    type: 'a-select',
    data: [
      {
        label: '一月',
        value: '01'
      },
      {
        label: '二月',
        value: '02'
      },
      {
        label: '三月',
        value: '03'
      },
      {
        label: '四月',
        value: '04'
      },
      {
        label: '五月',
        value: '05'
      },
      {
        label: '六月',
        value: '06'
      },
      {
        label: '七月',
        value: '07'
      },
      {
        label: '八月',
        value: '08'
      },
      {
        label: '九月',
        value: '09'
      },
      {
        label: '十月',
        value: '10'
      },
      {
        label: '十一月',
        value: '11'
      },
      {
        label: '十二月',
        value: '12'
      }
    ],
    slot: true,
    rules: [{ required: true, message: '请选择', trigger: 'change' }]
  },
  {
    label: '未履约延期成本(万元)',
    keyName: 'delayCost',
    type: 'BaseInputNumber',
    precision: 2,
    attrs: {
      min: 0,
      step: 0.01
    },
    rules: [{ required: true, message: '请输入', trigger: 'change' }]
  },
  {
    label: '业主费用补偿(万元)',
    keyName: 'ownerCost',
    type: 'BaseInputNumber',
    precision: 2,
    attrs: {
      min: 0,
      step: 0.01
    },
    rules: [{ required: true, message: '请输入', trigger: 'change' }]
  },
  {
    label: '补偿比例(%)',
    keyName: 'subsidyRate',
    type: 'BaseInputNumber',
    precision: 2,
    attrs: {
      min: 0,
      max: 100,
      step: 0.01
    },
    rules: [{ required: true, message: '请输入', trigger: 'change' }]
  },
  {
    label: '累计专业工程暂估价发包额(万元)',
    keyName: 'contractAmount',
    type: 'BaseInputNumber',
    precision: 2,
    attrs: {
      min: 0,
      step: 0.01
    },
    rules: [{ required: true, message: '请输入', trigger: 'change' }]
  },
  {
    label: '累计专业工程暂估价签约额(万元)',
    keyName: 'signingAmount',
    type: 'BaseInputNumber',
    precision: 2,
    attrs: {
      min: 0,
      step: 0.01
    },
    rules: [{ required: true, message: '请输入', trigger: 'change' }]
  },
  {
    label: '附件',
    keyName: 'contractAmountCaseFileList',
    type: 'uploadFile',
    attrs: {
      disabled: false,
      needChineseName: true,

    },
    businessCode: "PM34",
    span: 24,
  }
]
// 动态信息编辑(专业)
const updataList2 = [
  {
    label: '项目状态',
    keyName: 'projectStatus',
    type: 'a-select',
    data: [
      {
        label: '施工准备',
        value: 'ONGOING'
      },
      {
        label: '在建',
        value: 'START_WORKING'
      },
      {
        label: '停工',
        value: 'SHUTDOWN'
      },
      {
        label: '停缓建',
        value: 'SUSPENDED'
      },
      {
        label: '竣工',
        value: 'MAINTENANCE_PERIOD'
      }
    ],
    rules: [{ required: true, message: '请选择', trigger: 'change' }]
  },
  {
    label: '实际竣工日期',
    keyName: 'actualFinishDate',
    type: 'a-date-picker',
    attrs: {
      disabledDate: () => { }
      // valueFormat: 'YYYY-MM-DD'
    },
    rules: [{ required: true, message: '请选择', trigger: 'change' }]
  },
  // {
  //   label: '形象进度',
  //   keyName: 'imageProgressName',
  //   type: 'BaseInput',
  //   rules: [{ required: true, message: '请选择', trigger: 'change' }]
  // },
  {
    label: '已组织创优级别',
    keyName: 'creativeLevelId',
    type: 'a-select',
    data: [],
    rules: [{ required: true, message: '请选择', trigger: 'change' }]
  },
  {
    label: '已组织创优内容',
    keyName: 'meritContentId',
    type: 'a-select',
    data: [],
    rules: [{ required: true, message: '请选择', trigger: 'change' }]
  },
  {
    label: '已组织观摩级别',
    keyName: 'observingLevelId',
    type: 'a-select',
    data: [],
    rules: [{ required: true, message: '请选择', trigger: 'change' }]
  },
  {
    label: '已组织观摩内容',
    keyName: 'observingContent',
    type: 'BaseTextarea',
    span: 24,
    rules: [{ required: true, message: '请输入', trigger: 'change' }]
  },
  {
    label: '未履约延期成本(万元)',
    keyName: 'delayCost',
    type: 'BaseInputNumber',
    precision: 2,
    attrs: {
      min: 0,
      step: 0.01
    },
    rules: [{ required: true, message: '请输入', trigger: 'change' }]
  },
  {
    label: '业主费用补偿(万元)',
    keyName: 'ownerCost',
    type: 'BaseInputNumber',
    precision: 2,
    attrs: {
      min: 0,
      step: 0.01
    },
    rules: [{ required: true, message: '请输入', trigger: 'change' }]
  },
  {
    label: '补偿比例(%)',
    keyName: 'subsidyRate',
    type: 'BaseInputNumber',
    precision: 2,
    attrs: {
      min: 0,
      max: 100,
      step: 0.01
    },
    rules: [{ required: true, message: '请输入', trigger: 'change' }]
  },
  {
    label: '累计专业工程暂估价发包额(万元)',
    keyName: 'contractAmount',
    type: 'BaseInputNumber',
    precision: 2,
    attrs: {
      min: 0,
      step: 0.01
    },
    rules: [{ required: true, message: '请输入', trigger: 'change' }]
  },
  {
    label: '累计专业工程暂估价签约额(万元)',
    keyName: 'signingAmount',
    type: 'BaseInputNumber',
    precision: 2,
    attrs: {
      min: 0,
      step: 0.01
    },
    rules: [{ required: true, message: '请输入', trigger: 'change' }]
  },
  {
    label: '年度计划产值(万元)',
    keyName: 'annualPlanOutputValue',
    type: 'BaseInputNumber',
    rules: [{ required: true, message: '请输入', trigger: 'change' }],
    precision: 2,
    attrs: {
      min: 0,
      step: 0.01
    },
  },
  {
    label: '年度目标产值(万元)',
    keyName: 'annualTargetOutputValue',
    type: 'BaseInputNumber',
    rules: [{ required: true, message: '请输入', trigger: 'change' }],
    precision: 2,
    attrs: {
      min: 0,
      step: 0.01
    },
  },
  {
    label: '年初至今完成施工产值(万元)',
    keyName: 'toTodayCompleteOutputValue',
    type: 'BaseInputNumber',
    rules: [{ required: true, message: '请输入', trigger: 'change' }],
    precision: 2,
    attrs: {
      min: 0,
      step: 0.01
    },
  },
  {
    label: '年初至今业主确认(万元)',
    keyName: 'toTodayOwnerConfirmOutputValue',
    type: 'BaseInputNumber',
    rules: [{ required: true, message: '请输入', trigger: 'change' }],
    precision: 2,
    attrs: {
      min: 0,
      step: 0.01
    },
  },
  {
    label: '当月完成产值(万元)',
    keyName: 'monthCompleteOutputValue',
    type: 'BaseInputNumber',
    rules: [{ required: true, message: '请输入', trigger: 'change' }],
    precision: 2,
    attrs: {
      min: 0,
      step: 0.01
    },
  },
  {
    label: '当月业主确认产值(万元)',
    keyName: 'monthOwnerConfirmOutputValue',
    type: 'BaseInputNumber',
    rules: [{ required: true, message: '请输入', trigger: 'change' }],
    precision: 2,
    attrs: {
      min: 0,
      step: 0.01
    },
  },
  {
    label: '附件',
    keyName: 'contractAmountCaseFileList',
    type: 'uploadFile',
    attrs: {
      disabled: false,
      needChineseName: true,
    },
    businessCode: "PM34",
    span: 24,
  }
]
// 资源配置表头
const columns1 = [
  {
    title: '',
    width: '33%',
    dataIndex: 'name'
  },
  {
    title: '备案项目经理',
    width: '33%',
    dataIndex: 'recordProjectManager'
  },
  {
    title: '实际项目经理',
    width: '33%',
    dataIndex: 'actualProjectManager'
  },
]
const columns2 = [
  {
    title: '岗位',
    width: '33%',
    dataIndex: 'post'
  },
  {
    title: '工作年限',
    width: '33%',
    dataIndex: 'years'
  },
  {
    title: '当前岗位任职年限',
    width: '33%',
    dataIndex: 'currentPositionYears'
  },
]
const columns3 = [
  {
    title: '',
    width: '33%',
    dataIndex: 'timeQuantum'
  },
  {
    title: '人数',
    width: '33%',
    dataIndex: 'number'
  },
  {
    title: '占比',
    width: '33%',
    dataIndex: 'proportion'
  },
]
export {
  searchOption,
  columns,
  columns1,
  columns2,
  columns3,
  formList,
  updataList1,
  updataList2
}
